package com.phynos.web.manager.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.phynos.web.manager.ui.component.UISidebarMenu;

/**
 * 左侧导航栏
 * @author lupc
 *
 */
@Controller
public class MenuController extends BaseViewController {

	/**
	 * 处理所有菜单栏URL参数
	 * @param menuId
	 * @return
	 */
	@ModelAttribute(value="nav")
	public UISidebarMenu getMenuURLInfo(
			@RequestParam("menuId") String menuId
			) {
		UISidebarMenu nav = getNav();
		nav.setActive(menuId);
		return nav;
	}
	
	@RequestMapping("/map")
	public String getMapView(
			){
		return "map/map";
	}
	
	@RequestMapping("/chart/line")
	public String getChartLineView(
			){
		return "chart/line";
	}
	
	@RequestMapping("/chart/bar")
	public String getChartBarView(
			){
		return "chart/bar";
	}
	
	@RequestMapping("/form/baseForm")
	public String getBaseFormView(){
		return "form/baseForm";
	}
	
	@RequestMapping("/report/baseReport")
	public String getBaseReportView(){
		return "report/baseReport";
	}
	
	@RequestMapping("/report/advanceReport")
	public String getAdvanceReportView(
			){
		return "report/advanceReport";
	}
	
	@RequestMapping("/user/userManager")
	public String getUserManagerView(){
		return "user/userManager";
	}
	
	@RequestMapping("/user/rightManager")
	public String getRightManagerView(){
		return "user/rightManager";
	}
	
	@RequestMapping("/user/roleManager")
	public String getRoleManagerView(){
		return "user/roleManager";
	}
	
	@RequestMapping("/other/tv")
	public String getTVView(){
		return "other/tv";
	}
	
	@RequestMapping("/ui/baseControl")
	public String getBaseControlView(
			){
		return "ui/baseControl";
	}
	
	@RequestMapping("/ui/dialog")
	public String getDialogView(
			){
		return "ui/dialog";
	}
	
	@RequestMapping("/ui/cssIcon")
	public String getCssIconView(
			){
		return "ui/cssIcon";
	}
	
	@RequestMapping("/ui/tab")
	public String getTabView(
			){
		return "ui/tab";
	}
	
}
